<?php

namespace App\Http\Controllers\Api;

use App\Models\Goods;
use Illuminate\Http\Request;
use App\Http\Transformers\GoodsTransformer;

class GoodsController extends BaseController {

    public function index($categoryId) {
        $goods = Goods::where('category_id', $categoryId)->paginate(20);
        return $this->response->paginator($goods, new GoodsTransformer());
    }

}
